package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TransactionRecordMapper;
import com.ruoyi.system.domain.TransactionRecord;
import com.ruoyi.system.service.ITransactionRecordService;

/**
 * 医保局交易记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-13
 */
@Service
public class TransactionRecordServiceImpl implements ITransactionRecordService 
{
    @Autowired
    private TransactionRecordMapper transactionRecordMapper;

    /**
     * 查询医保局交易记录
     * 
     * @param id 医保局交易记录主键
     * @return 医保局交易记录
     */
    @Override
    public TransactionRecord selectTransactionRecordById(Long id)
    {
        return transactionRecordMapper.selectTransactionRecordById(id);
    }

    /**
     * 查询医保局交易记录列表
     * 
     * @param transactionRecord 医保局交易记录
     * @return 医保局交易记录
     */
    @Override
    public List<TransactionRecord> selectTransactionRecordList(TransactionRecord transactionRecord)
    {
        return transactionRecordMapper.selectTransactionRecordList(transactionRecord);
    }

    /**
     * 新增医保局交易记录
     * 
     * @param transactionRecord 医保局交易记录
     * @return 结果
     */
    @Override
    public int insertTransactionRecord(TransactionRecord transactionRecord)
    {
        transactionRecord.setCreateTime(DateUtils.getNowDate());
        return transactionRecordMapper.insertTransactionRecord(transactionRecord);
    }

    /**
     * 修改医保局交易记录
     * 
     * @param transactionRecord 医保局交易记录
     * @return 结果
     */
    @Override
    public int updateTransactionRecord(TransactionRecord transactionRecord)
    {
        return transactionRecordMapper.updateTransactionRecord(transactionRecord);
    }

    /**
     * 批量删除医保局交易记录
     * 
     * @param ids 需要删除的医保局交易记录主键
     * @return 结果
     */
    @Override
    public int deleteTransactionRecordByIds(Long[] ids)
    {
        return transactionRecordMapper.deleteTransactionRecordByIds(ids);
    }

    /**
     * 删除医保局交易记录信息
     * 
     * @param id 医保局交易记录主键
     * @return 结果
     */
    @Override
    public int deleteTransactionRecordById(Long id)
    {
        return transactionRecordMapper.deleteTransactionRecordById(id);
    }
}
